package grammer.components;

public enum PowerEnum implements Component {
	GENERIC_POWER, HIGH, LOW, MEDIUM;
	@Override
	public Component match(String toMatch) {
		for (PowerEnum power : PowerEnum.values()) {
			if (power.toString().equalsIgnoreCase(toMatch))
				return power;
		}
		return null;
	}

	@Override
	public String toString() {
		switch (this) {
		case LOW:
			return "low";
		case MEDIUM:
			return "medium;";
		case HIGH:
			return "high";
		default:
			return "setting";
		}
	}
}
